﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="OnlineManagement.Web._Default" %>
<%@ Register Src="~/userControl/UCPigPenSettings.ascx" TagPrefix="UC" TagName="PigPen" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <link href="resources/css/jquery.ui.all.css" rel="stylesheet" type="text/css" />
    <script src="resources/scripts/jquery-1.10.2.js" type="text/javascript"></script>
    <script src="resources/scripts/jquery.ui.core.js" type="text/javascript"></script>
    <script src="resources/scripts/jquery.ui.datepicker.js" type="text/javascript"></script>
    <script src="resources/scripts/jquery.ui.datepicker-zh-TW.js" type="text/javascript"></script>
    <link href="resources/css/colorbox.css" rel="stylesheet" type="text/css" />
    <script src="resources/scripts/jquery.colorbox.js" type="text/javascript"></script>
    
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            //$("#txtDate").datepicker($.datepicker.regional["zh-TW"]);
            //$("#txtDate").datepicker("option", "dateFormat", "yy-mm-dd");
            var s = "a";


            $("#btn").click(function () {
                var hoggeryId = 1001;
                var isCombine = true;
                var hogtype = 1;
                $.ajax({
                    type: "post",
                    contentType: "application/json",
                    url: "WebServices/HogService.asmx/HogPageInit",
                    dataType: "json",
                    data: "{ hoggeryId: '" + hoggeryId + "',isCombine:'" + isCombine + "',hogType:'" + hogtype + "',tableNum:'" + 2 + "' }",
                    success: function (data) {
                        var txt = "";
                        $.each(data, function (k, v) { $.each(v, function (m, n) { txt += "id :" + n.id + ";name :" + n.name + ";sex :" + n.sex + "<br/>" }); });
                        $("#txt").html(txt);
                    },
                    error: function (error) {
                        alert(error);
                    }
                });

            });

            $("#btn1").click(function () {
                window.location.reload();
            });

           

        });
    </script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
   
    <h2>
        Welcome to ASP.NET!
    </h2>
    <p>
        To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">
            www.asp.net</a>.
    </p>
    <p>
        <input type="text" id="txtDate" />
        <label id="lb"></label>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <br />
        <input type="button" title="JavaScrtipt" id="btn" value="JavaScrtipt" />
        <input type="button" title="JavaScrtipt" id="btn1" value="JavaScrtiptreload" />
        <select id="seleteType"></select>
        <hr />
        <label id="txt"></label>
    </p>
    <asp:Button ID="btnLog" runat="server" Text="log test" />
  
</asp:Content>
